#pragma once

#include "RefCounted.h"
#include "AsteroidOrbitParam.h"
#include "GetEphemInterface.h"

class CApproach: public CRefCountedAdapterBase
{
public:
	typedef CRefCounted<CApproach> Ptr;
public:
	CApproach(eBodies bodyNum, double dTime, const SBody &body, double dXdiff[3], CAsteroidOrbitParam::Ptr pOrbitParam);
	virtual ~CApproach(void);
	double Dist() const;
	void Print() const;

	static bool CompareApproachesByTime(Ptr a, Ptr b);
	static bool CompareApproachesByTimeParam(Ptr a, Ptr b);
protected:
public:
	eBodies		m_bodyNum;
	double		m_dTime;
	SBody		m_body;
	double		m_dXdiff[3];
	double		m_dDist;

	CAsteroidOrbitParam::Ptr	m_pAsteroidOrbitParam;
};

typedef list<CApproach::Ptr> ListPtrApproachs;



class CGridParam;
class IDrawInterface
{
public:
	virtual bool LoadGridParam ( CGridParam * gp ) = 0;
	virtual bool AppendApproaches(ListPtrApproachs &ListOut) = 0;
};

